import api from './index'

// 获取余额支付订单列表
export const getBalancePaymentOrders = (params?: { page?: number; page_size?: number }) => {
  return api.get('/balance/order', { params })
}

// 获取余额支付订单详情
export const getBalancePaymentOrderById = (id: number) => {
  return api.get(`/balance/order/${id}`)
}

// 创建余额支付订单
export const createBalancePaymentOrder = (data: any) => {
  return api.post('/balance/order', data)
}

// 更新余额支付订单
export const updateBalancePaymentOrder = (id: number, data: any) => {
  return api.put(`/balance/order/${id}`, data)
}

// 删除余额支付订单
export const deleteBalancePaymentOrder = (id: number) => {
  return api.delete(`/balance/order/${id}`)
}